SKL_2_SKX.exe information

Discussion in 'Modeling & Skinning' started by TheStorm, Apr 21, 2003.

  1. TheStorm Administrator

    Contributions:
    27
    Specialties:
    Mapper, Scripting
    Processing:
    Graphics:
    This is information are from Promitheas over at the Lightray 3D forum.

    skl_2_skX.exe is part of ea's Spearhead SDK recently released.
    --------------------------------------------------------------------------------

    Simple Examples:

    Go to Windows Start/Run.
    Type the fullpath of skl_2skx.exe, SKL filename, commands and press OK.

    Spearhead
    -------------------
    c:/tools/skl_2_skX.exe myfile -baseframe ---> creates a SKD file.
    --
    c:/tools/skl_2_skX.exe myfile --->creates a SKC file

    Mohaa
    ---------
    Just add -mohaa command
    c:/tools/skl_2_skX.exe myfile -baseframe -mohaa ---> creates a SKD file.
    --
    c:/tools/skl_2_skX.exe myfile -mohaa --->creates a SKC file

    *replace 'c:/tools/' with the path you have skl_2_skX.exe installed.
    *replace myfile with your *.SKL filename(or fullpath).

    Overview
    ------------------
    skl_2_skX is a command line utility for converting. SKL files into a form usable by the Tiki model system. *.SKL files are text-based model files.

    Having the functionality of skl_2_skX as a separate program from the exporter allows changes in model format without requiring the artists to re-export their models.

    skl_2_skX will check the file times of the source and destination file and only rebuild them if they differ. This reduces runtime when running skl_2_skX from a batch file that converts a lot of animations when only a few have changed.

    File formats
    Being text-based allows .SKL files to be viewed or edited in a text editor, making diagnosing problems in models more convenient.

    skl_2_skX exports two types of files:
    *.SKC and *.SKD. SKD files contain the definitions of the bone heirarchy, vertex weights, surfaces, triangles, and level of detail (LOD). SKC files contain only the bone animation info.

    SKD Files
    --------------------
    SKD files are created from the model’s baseframe.
    Each model only needs one SKD file.
    The baseframe is the .SKL file that has the model posed in such a way as to create the best LOD information possible.
    The order that triangles are removed as the model is lowered in detail is based upon the length of the edges and the orientation of neighboring triangles.

    Triangles with very short edges or whose orientation differs the least from triangles that share the same edge are chosen first.
    Edges that are seams (either the triangle has a different texture from its neighbor, or doesn’t have a neighbor) can not be removed, and so limit how low detail the model can go.

    In order to create the best LOD information, models should be posed such that important joints are bent so that triangles at those joints reduce detail last. For example, if a model’s arms are kept straight in the baseframe, then when the model reduces in detail the upper arm and forearm will appear to have webbing between them, like a bat. Bending the arms in the baseframe will help skl_2_skX choose more appropriate triangles when lowering detail.

    Since the SKD file also contains the definition of the bone heirarchy, if the order of the bones are changed, or the bones are renamed, then the SKD file should be recreated to reflect the changes. Also, while changing the bone names is harmless, if the bone order changes in the SKD file, you should rebuild the SKC files to make sure the bone order is the same in them.

    The names and triangles contained in each surface are stored in the SKD file. When surface names or IDs change in the SKL file, you should rerun skl_2_skX to recreate the baseframe to reflect the change.

    SKC Files
    ------------------------
    SKC files contain only animation information. You should have at least one SKC for each animation in the model. SKCs contain bone animation information and movement deltas for each frame.

    Movement deltas are created by measuring the movement of the specified origin bone. By default, the bone named “origin” is expected, but you can use the –origin parameter to specify a different bone. No matter where the origin bone is in any frame of the original animation, it will be moved to (0, 0, 0) in the model’s coordinate space, with all other bones still in the same relative position around it.

    When the model is animated in the game, it will simply sit in place if the game physics doesn’t apply the movement deltas to the position. Using this method we are able to remove any sliding of the character’s feet on the ground.

    Command line options:
    -------------------------------------------
    skl_2_skX animname [-force] [-scale num] [-dest name]
    [-ignore filename] [-origin originname] [-reverse]
    [-verbose] [-nolod] [-noclampz] [-zeroz] [-noorigin]
    [-clearz] [-clearxy] [-baseframe] [-maxbones num]
    [-weightthreshold num]
    [-offset x y z] [-clearx] [-cleary] [-loop]
    [-zerox] [-zeroy] [-destdir dirname]
    [-dest filename] [-ignoreflags] [-fps num]
    [-newbaseframe]
    [-morphbase filename] [-morphanim filename]
    [-nologfile]
    [-attachedModel]
    [-doRotation]
    [-animtype <fullbody|movement|action|hands|morphonly>]
    [-speedscale scale]
    [-mohaa]

    animname
    This is the name of a SKL file. (only type "myfile", not "myfile.skl")

    -force
    Causes skl_2_skX to re-process the animation regardless of what the time and date of the destination file is.

    -scale num
    Specify a scale to be used when converting the file. The default scale is 1.

    -dest filename
    Specify an alternate destination name for the SKC for SKD file.
    Normally the destination file shares the same name as the animname but with a SKC or SKD extension.
    Note that the directory remains the same.

    -ignore filename
    Specify an external file which contains a list of surfaces to ignore when grabbing this model. This is used extensively when grabbing a multi-part model.

    -origin originname
    Specify an alternate surface name for the origin. Normally, the origin surface is simply called “origin”, this allows one to choose an alternate surface name for the origin. This is used extensively when grabbing a multi-part model.

    -reverse
    Reverse the order of frames of the animation.

    -verbose
    Output a lot of information while processing the model.

    -nolod
    Do not create an LOD mapping for this model.

    -noclampz
    By default, the Z component of the origin bone is clamped to only positive and zero values. If you would like to allow negative Z values, use this option.

    -zeroz
    Always set the Z component of the origin bone to zero.

    -noorigin
    Don’t subtract the origin’s position from the model’s position. No movement deltas are produced.

    -clearz
    Specifies that Z movement is cleared out on deltas.

    -clearxy
    Specifies that X and Y movement is cleared out on deltas.

    -baseframe
    Save the model as SKD. The SKD file contains the bone definitions, the surfaces, texture coordinates, triangles, and the LOD mapping.

    -maxbones num
    Limit the number of bones that can affect a vertex to num per vertex. The num most influential bones will be used. The default (and maximum) is 8.

    -weightthreshold weight
    Limit the minimum influence a bone must have to be included in a vertex. Any with less influence will not affect the vertex. The default value is 0.01.

    -offset x y z
    Offsets the model by the specified amount. This is useful for when animations are animated at different heights or using different origin tags.

    -clearx
    Specifies that X movement is cleared out on deltas.

    -cleary
    Specifies that Y movement is cleared out on deltas.

    -loop
    Drops the last frame of the animation. This allows skl_2_skX to properly calculate deltas on looped animations. The last frame in the animation should be the pose as the first frame.

    -destdir dirname
    Specify an alternate destination directory for the SKC for SKD file.
    Normally the destination directory is the current working directory.

    -ignoreflags
    Normally, when a bone’s parent is unused and no bone with the same leg/torso designation exists higher up the hierarchy,
    the parent is kept, despite the fact that it doesn’t affect any vertices. Ignoreflags instructs skl_2_skX to not perform this check. Typically, this would be used when it isn’t feasible to use the –bones command because the hierarchies differ.

    -nologfile
    No log files(slg) will be created.

    -fps num
    Sets frames per second.

    -newbaseframe
    Skeletor baseframe export.

    -morphbase filename

    -morphanim filename

    -attachedModel

    -doRotation

    -animtype <fullbody|movement|action|hands|morphonly>
    Default is fullbody.

    -speedscale scale
    Speedscale is an untested system. Frames per second will be multiplied by scale.

    -mohaa
    Use this command to export MOH:AA SKD,SKC files. Else MOH:AA Spearhead files will be created.
  2. TheStorm Administrator

    Contributions:
    27
    Specialties:
    Mapper, Scripting
    Processing:
    Graphics:
    If anyone uses this tool and have more information, please add in a post!! Also if you got information about error msg and what causes them and how to solve them, please post! :)
  3. moh2002 Private

    Contributions:
    2
    storm

    well there is one that i get that gives me an error about zero vector error and wut was happening was that the skl_2_skx.exe could not convert a 0 to a one so i had to move my model to a diff. part on the axis.
    1 person likes this.
  4. KillerKind Private

    Contributions:
    21
    Very nice post Storm, good info! I just used the -mohaa option to get my new weapons in AA. :bigrin:
    1 person likes this.
  5. ducati916 Private

    Contributions:
    1
    omg not workin

    ok i have done what it said at the top with all comands and skl_2_skx.exe full path and its not workin it might just be me bein a n00b but could someone show me how it should look (what i type in run) if i'm making it for moh allied assault here is the path of skl_2_skx.exe c:\Program Files\EA GAMES\MOHAA\SDK\tools/skl_2_skX.exe


    this is ehat i have put in run


    c:\Program Files\EA GAMES\MOHAA\SDK\tools/skl_2_skX.exe colt45.SKL -baseframe -mohaa

    and when i press ok it says "windows canot find c:\ program files..........."
    can somone please corect it

    thanx
    :confused:
    1 person likes this.
  6. TheStorm Administrator

    Contributions:
    27
    Specialties:
    Mapper, Scripting
    Processing:
    Graphics:
    You can make a bat file or something to run it but else do it like this.

    First! Make sure the SKL file is saved in the same directory as the skl_2_skx.exe file

    Start the "command promt", the one that gives you a dos window.
    Change drive and dir until you are in the folder where the SKL and skl_2_skx are located. To change drive in dos promt type c:" (or d: or whatever). To change dir type cd Program Files\EA GAMES\MOHAA\SDK\tools (if that's the dir you want)

    To create you SKD file type (mysklfile = your skl file name and without the extension skl)

    skl_2_skx mysklfile -baseframe

    To create your SKC

    skl_2_skx mysklfile

    If you add the option -mohaa then you will get a model usable in mohaa (or else it will only be spearhead).

    Example for the SKD

    skl_2_skx mysklfile -baseframe -mohaa

    Now you have the basic, the rest of the options for this can be read about in the first post.
  7. TheStorm Administrator

    Contributions:
    27
    Specialties:
    Mapper, Scripting
    Processing:
    Graphics:
    A small reminder when exporting the SKL from 3D max!

    This is for people who run their computer with Regional and Language Options that when it comes to number uses , instead of .. An exampel is the Nordic countries and I know a few other European countries.

    Numbers with UK/US settings are displayed like this 1,000,000.00 and 0.055995 but with other regional options it migth be displayed 1.000.000,00 / 1 000 000,00 and 0,055995. As you can see there is a different use of the , and ..

    Because of this the exported SKL file might get numbers like this 0,0005650 0,005497 0,479988 instead of 0.0005650 0.005497 0.479988. This means you will recive an error message when you try and run the SKL_2_SKX.EXE.

    The easiest way to avoid this is to temporary change the Regional setting to UK/US setting before starting 3D max. When you export the SKL file it will be correct. Any error messages after that is because of some other error. Just make sure you have checked this first in case you are uncertain that your country have the same number system as the UK/US one.
  8. Rookie One Corporal

    Contributions:
    29
    Specialties:
    Scripting, Programming
    Processing:
    Graphics:
    OK, but what is that .SKL and how to make them??? I can't find such a plugin neither in MS3D nor in LR3D...
  9. KillerKind Private

    Contributions:
    21
    The plugin is for 3d Max. It is included with the latest SDK.

    With LR3d there is no need for skl, you simply export to skd and skc.
  10. Rookie One Corporal

    Contributions:
    29
    Specialties:
    Scripting, Programming
    Processing:
    Graphics:
    Will that SKL plugin work in gMax?
  11. KillerKind Private

    Contributions:
    21
    Hmm...good question...I'm not sure. Sawed_Off?
  12. SniperMatt Private

    Contributions:
    3
    I tried the plug-in for g-max. It don't work. It specifically said in the sdk, in the folder that has the plug-ins, they were titled, 3ds max 3 and 3ds max 4. Also, on the g-max website, it has a list of games that they support, plug-in wise. MoH:AA and MoH:AAS aren't listed. :( it would be cool if they came out with one for g-max. :)

    SniperMatt
    1 person likes this.
  13. [Spec Ops] Jack Ruby Private

    Contributions:
    1
    Its driving me crazy :(

    im using 3dsm 5, just exported a simple cylinder as a .skl, I followed both ways of using the skl_2_skx thing,

    So if I go the start/run way it says, windows cannot find d:\ program etc..

    If I use the dos command prompt I get, skl_2_skx is not recognised as an internal or external command, operable program or batch file.

    Please help cos I am about to give my computer some kicks.

    edit: I found this thread at .map that fixed me up, http://dynamic4.gamespy.com/~map/mohaa/forum/viewtopic.php?t=1825&highlight=batch+file&sid=52a73c087130fac2b617d3f5c767f384
    1 person likes this.
  14. scorpio Midget Private

    Contributions:
    55
    I'm planning on releasing a plugin for Milk3d to create the SKL files and autorun the skl_2_skx.exe :)

    That should help all you poor modders, lol.
  15. scorpio Midget Private

    Contributions:
    55
    The new Milk3D Moh aa/sh/bt plugin started it's closed Alpha testing last night.

    1st results looked promising.

    Today testing will continue, open Beta test isn't far off.
  16. scorpio Midget Private

    Contributions:
    55
    Plugin is going great now.

    It now creates a basic tik file and a shader file, creates the skc and skd and move the whole lot into the mohaa folders for instant testing.

    U can either use Mohaa or MohRadiant to check the model is ok.

    Then all u need do is modify the tik file and/or shader file.

    Below is a screenie of a cat i exported from Milk3d into skc/skd format.
  17. scorpio Midget Private

    Contributions:
    55
    Currently i'm just implementing some keyframe interpolation code, and then i'll release the plugin for beta testing.
  18. TheStorm Administrator

    Contributions:
    27
    Specialties:
    Mapper, Scripting
    Processing:
    Graphics:
    Lol!! Nice work......can you make a voice activated plugin

    If you say "draw cat and export to mohaa", then the program will draw a cat and export it!! (it would make modeling so much easier)! [​IMG]
  19. scorpio Midget Private

    Contributions:
    55
    Right i'm putting to gether the beta version :)

    In the meantime here's some screenies to keep ya interested:

    Both were exported direct from milk3d, the tiks and shaders auto created.
    The dog was a just a static model, the rat was fully animated.
  20. Mustard_man BANNED

    Contributions:
    0
    That's a big dog :eek:
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page